home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / dtype / fontdt12.lha / Src / prefs.h < prev   
C/C++ Source or Header  |  1996-05-06  |  2KB  |  74 lines

  1. /*
  2. **    prefs.h - preferences handling interface for Font DataTypes class
  3. **    Copyright © 1995-96 Michael Letowski
  4. */
  5.  
  6. #ifndef PREFS_H
  7. #define PREFS_H
  8.  
  9. #ifndef EXEC_TYPES_H
  10. #include <exec/types.h>
  11. #endif
  12.  
  13. #ifndef DOS_RDARGS_H
  14. #include <dos/rdargs.h>
  15. #endif
  16.  
  17. #ifndef SUPPORT_TYPES_H
  18. #include <support/types.h>
  19. #endif
  20.  
  21. #ifndef CLASSBASE_H
  22. #include "classbase.h"
  23. #endif
  24.  
  25.  
  26. /*
  27. **    Public constants
  28. */
  29. #define TEMPLATE        "STRINGS/M,CENTER=CENTRE/S,INV=INVERSE/S,FN=FONTNAME/S,"\
  30.                                         "DPI/K,FG=FOREGROUND/K,BG=BACKGROUND/K"
  31. #define TEMPLATEDPI    "XDPI/A/N,YDPI/A/N"
  32. #define TEMPLATECOL    "R=RED/A/N,G=GREEN/A/N,B=BLUE/A/N"
  33.  
  34.  
  35. /*
  36. **    Public structures
  37. */
  38. /* User preferences for FontDT */
  39. struct Opts
  40. {
  41.     /* These fields are filled when parsing with TEMPLATE */
  42.     STRPTR *opt_Strings;                                                    /* Strings to display */
  43.     LONG    opt_Center;                                                        /* Center lines */
  44.     LONG    opt_Inverse;                                                    /* Inverted colors */
  45.     LONG    opt_FontName;                                                    /* Use font's name as text */
  46.     STRPTR  opt_DPIStr;                                                        /* DPI resolutions string */
  47.     STRPTR  opt_ForeStr;                                                    /* Foreground color string */
  48.     STRPTR  opt_BackStr;                                                    /* Background color string */
  49.     /* The following fields are filled by custom code: */
  50.     LONG    opt_XDPI;                                                            /* XDPI */
  51.     LONG    opt_YDPI;                                                            /* YDPI */
  52.     LONG    opt_ForeCol[3];                                                /* Foreground RGB */
  53.     LONG    opt_BackCol[3];                                                /* Background RGB */
  54.     LBOOL   opt_DPIFlag;                                                    /* DPI/K parsed */
  55.     LBOOL   opt_ForeFlag;                                                    /* FOREGROUND/K parsed */
  56.     LBOOL   opt_BackFlag;                                                    /* BACKGROUND/K parsed */
  57. };    /* Opts */
  58.  
  59. struct PrefsHandle
  60. {
  61.     struct RDArgs *ph_Args;                                                /* Result of ReadArgs() call */
  62.     struct RDArgs *ph_RDA1;                                                /* Preallocated RDArgs structures */
  63.     struct RDArgs *ph_RDA2;                                                /* Preallocated RDArgs structures */
  64. };    /* PrefsHandle */
  65.  
  66.  
  67. /*
  68. **    Public functions
  69. */
  70. struct PrefsHandle *GetFontPrefs(struct ClassBase *cb, struct Opts *opts);
  71. VOID FreeFontPrefs(struct ClassBase *cb, struct PrefsHandle *ph);
  72.  
  73. #endif    /* PREFS_H */
  74.